<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>三维空间</title>
		<style type="text/css">
			body{
				/* 透视 */
				perspective: 700px;
				perspective-origin: 50% 50%;
			}
			div{
				width: 300px;
				height: 300px;
			}
			.box1{
				/* 3D空间效果 */
				transform-style: preserve-3d;
				margin: 100px auto;
				background-color: rgba(0,255,255,0.4);
				transform: rotateY(45deg);
			}
			.box2{
				background-color: plum;
				transform: rotateX(60deg);
				transform-origin: center top;
			}
			.bigdox{
				transform-style: preserve-3d;
				position: relative;
				width: 400px;
				height: 400px;
				/* border: 1px solid red; */
				font-size: 36px;
				text-align: center;
				line-height: 400px;
				margin: 200px auto;
				animation: yr 3s infinite linear;
			}
			@keyframes yr {
				from:{
					transform: rotate3d(0,0,0,0);
				}
				to{
					transform: rotate3d(1,1,1,360deg);
				}
			}
			.bigdox div{
				position: absolute;
				top: 0;
				left: 0;
				width: 400px;
				height: 400px;
				border: 1px solid black;
			}
			.bigdox div:nth-child(1){
				transform: translateZ(200px);
			}
			.bigdox div:nth-child(2){
				transform: translateZ(-200px);
			}
			.bigdox div:nth-child(3){
				transform: translateX(200px) rotateY(90deg);
			}
			.bigdox div:nth-child(4){
				transform: translateX(-200px) rotateY(90deg);
			}
			.bigdox div:nth-child(5){
				transform: translateY(200px) rotateX(90deg);
			}
			.bigdox div:nth-child(6){
				transform: translateY(-200px) rotateX(90deg);
			}
		</style>
	</head>
	<body>
		<div class="box1">
			<div class="box2"></div>
		</div>
		<div class="bigdox">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
			<div>6</div>
		</div>
	</body>
</html>
